<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<body>
    <div id="app">
        <h2>{{title}}</h2>
        <input v-model="name">
        <h1>{{name}}</h1>
        <button v-on:click="clickMe">click Me!</button>
    </div>
    <script>
        var app =new Vue({
            el:'#app',
            data:{
                title:'你好！',
                name:'canfoo'
            },
            methods:{
                clickMe: function(){
                    this.title = 'hello world';
                }
            }
        })

        
    </script>
</body>
</html>